package com.example.lenovo.tianqi.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.lenovo.tianqi.R;

import java.util.List;

/**
 * Created by lenovo on 2018/1/11.
 */
//首先需要继承BaseQuickAdapter,然后BaseQuickAdapter<Status, BaseViewHolder>第一个泛型Status是数据实体类型，第二个BaseViewHolder是ViewHolder其目的是为了支持扩展ViewHolder。
public class CitySelectorAdapter extends BaseQuickAdapter<String,BaseViewHolder>{
    public CitySelectorAdapter(int layoutResId, @Nullable List<String> data) {
        super(layoutResId, data);
    }
//viewHolder.getLayoutPosition() 获取当前item的position
    @Override
    protected void convert(BaseViewHolder helper, String item) {
       helper.setText(R.id.item_select_cityName,item);
    }
}
